package com.hxx.widget.richtext.editor

/**
 * 保存编辑状态
 */
interface EditorSaveStater {
    fun canUndo(): Boolean
    fun canRedo(): Boolean
    fun saveNode(editorHistory:EditorHistory)
    fun redoNode():EditorHistory
    fun undoNode():EditorHistory
    fun setStateChangedListener(listener: OnStateChangedListener)
    interface OnStateChangedListener{
        fun onChanged()
    }
    companion object{
        fun getSaver():EditorSaveStater{
            return BaseEditorSaveStater.instance()
        }
    }
}